home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 163_01 / putw.c < prev    next >
Text File  |  1988-01-30  |  512b  |  13 lines

  1. /*
  2. ** put a word to the stream
  3. */
  4. #define FILE int
  5. #include "streamio.h"
  6. extern fputc();
  7.  
  8. putw(w, stream) int w;  FILE *stream; {
  9.   if(fputc((w >> 8) & 255, stream) == EOF) return EOF;
  10.   if(fputc(w & 255, stream) == EOF) return EOF;
  11.   return w;
  12.   }
  13.